package com.zhouyu.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

/**
 * 测试Spring 的推断构造
 *
 * @author by gang.Li 2022/4/6 16:56
 */
@Component
//@Lazy
public class MemberService {
	@Autowired
	private OrderService orderService;

	public MemberService() {
		System.out.println(0);
	}

//	public MemberService(OrderService orderService) {
//		System.out.println(1);
//		this.orderService = orderService;
//	}

	//	@Autowired
	public MemberService(OrderService orderService, OrderService orderService1) {
		System.out.println(2);
		this.orderService = orderService;
	}

	public void test() {
		System.out.println(orderService);
	}

}
